class AllgiftModel {
  List<Datalist> datalist;
  int sum;

  AllgiftModel({this.datalist, this.sum});

  AllgiftModel.fromJson(Map<String, dynamic> json) {
    if (json['datalist'] != null) {
      datalist = new List<Datalist>();
      json['datalist'].forEach((v) {
        datalist.add(new Datalist.fromJson(v));
      });
    }
    sum = json['sum'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datalist != null) {
      data['datalist'] = this.datalist.map((v) => v.toJson()).toList();
    }
    data['sum'] = this.sum;
    return data;
  }
}

class Datalist {
  int gid;
  String icon;
  String name;
  dynamic num;
  String one;

  Datalist({this.gid, this.icon, this.name, this.num, this.one});

  Datalist.fromJson(Map<String, dynamic> json) {
    gid = json['gid'];
    icon = json['icon'];
    name = json['name'];
    num = json['num'];
    one = json['one'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['gid'] = this.gid;
    data['icon'] = this.icon;
    data['name'] = this.name;
    data['num'] = this.num;
    data['one'] = this.one;
    return data;
  }
}
